//
//  NewsTableViewCell.m
//  BaseTools
//
//  Created by 李挺哲 on 15/8/25.
//  Copyright (c) 2015年 ltz. All rights reserved.
//

#import "NewsTableViewCell.h"
#import "UIKit+AFNetworking.h"
@implementation NewsTableViewCell
+(instancetype)newsTableViewCellWithTableView:(UITableView *)tableView{
    static NSString *reuseId = @"NewsTableViewCell";
    NewsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseId];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"NewsTableViewCell" owner:nil options:nil] lastObject];
    }
    return cell;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setData:(News *)news{
    _time.text=news.time;
    _title.text=news.title;
    NSLog(@"news.picUrl  %@",news.picUrl);
    NSURL *url=[[NSURL alloc] initWithString:news.picUrl];
    [_image setImageWithURL:url placeholderImage:[UIImage imageNamed:@"image"]];

}
@end
